home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
lotus1.arc
/
TEST123.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-04-28
|
4KB
|
75 lines
{$N+,E+} (* $N+ compiles for math coprocessor which will be used *)
(* automatically if available. E+ activates the *)
(* 80X87 emulator which will be used if a coprocessor *)
(* is not present. I understand that these are program *)
(* wide options and cannot be used in a unit separately *)
(* Written by Dan Glanz, Alexandria, Virginia (76672,2572), May, 1989. *)
(* as a public service. *)
(* There are no restrictions on use and no gaurantees that it works. *)
(* All I ask is a smidgeon of credit. *)
(* If you include this in a program, leave the credit line in. *)
(* If you modify the unit, add your own credit line. *)
Program Test123;
uses crt, dos, Unit123;
(****************************************************************)
(* Demonstration and test program *)
(* *)
(* This demonstration is to be used with the unit "UNIT123" *)
(* which is in the same ARC file. *)
(* *)
(* Reads any Lotus file and copies the file read to another *)
(* file minus any blank cells, cells containing format *)
(* range names and other information. Formulas are not *)
(* copied but the current value of formats is copied to the *)
(* new file as a real cell value. The new file will be *)
(* located in the same directory and will have the same *)
(* name as the old file except that the extension will *)
(* be set to ".WK!". *)
(* *)
(* Pauses after each cell is read and displays the contents *)
(* of the cell. Press any key to continue. *)
(* *)
(****************************************************************)
var
Response : char;
begin
Get_Input_File_Name; {Solicits the input file name from console}
Open_Lotus_Read_File; {Open a WKS, WK1 file and read version }
Make_New_File_Name; {Make new file name with .WK! extension }
Open_Lotus_Write_File; {Open the new file for writing }
repeat
Read_Lotus_Record ;
Print_Lotus_Record; {Display record read (except }
{blank records, which are a }
{waste of time }
Write_Lotus_Record; {Write the record read to the}
{new file}
Response := ReadKey; {Pause after reading, writing and }
If Response = #27 then {printing each record. }
begin {Press any key to continue }
Close_Lotus_Write_File; {or Esc to stop. If you }
halt; {stop in the middle of }
end; {copying, the new file will}
{still be usable. }
until Lotus_End_Of_File;
Close_Lotus_Write_File; {Writes a Lotus end of file}
{and closes the file}
Writeln('Done reading and writing.');
end.